use yew::prelude::*;

#[derive(Clone, PartialEq, Properties)]
pub struct ButtonProps {
    #[prop_or_default]
    pub text: String,
    #[prop_or_default]
    pub onclick: Callback<()>,
}

#[function_component]
pub fn Button(props: &ButtonProps) -> Html {
    let onclick = props.onclick.reform(|_| {
        ()
    });
    html! {
        <button {onclick}>{&props.text}</button>
    }
}
